package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.Visitor;


public class VisitorMapper implements RowMapper<Visitor>{

	@Override
	public Visitor mapRow(ResultSet resultSet, int numRow) throws SQLException {
		Visitor visitor = new Visitor();
		
			visitor.setIdVisitor(resultSet.getInt("idVisitor"));		
			
			visitor.setVisitorName(resultSet.getString("Visitorname"));
			
			visitor.setPassword(resultSet.getString("password"));
			
			visitor.setIsAdmin(resultSet.getBoolean("isAdmin"));

			
		return visitor;
	}

}
